<template>
  <el-form :model="userForm" status-icon ref="userForm" label-width="100px" class="demo-userForm">

    <el-table :data="tableData" style="width: 100%" :default-sort="{ prop: 'email', order: 'username' }">
      <!-- <el-table-column prop="id" label="id" sortable width="180">
      </el-table-column> -->
      <el-table-column prop="username" label="用户名" sortable width="%50">
      </el-table-column>
      <el-table-column prop="email" label="email" sortable width="%50">
      </el-table-column>
    </el-table>
  </el-form>
</template>

<script>
import { getList } from '@/api/table'
import { getBooksList } from '@/api/user'
export default {


  data() {
    return {
      tableData: [],
      userForm: {
        username: '',
        email: '',
      },
      total:0
    }
  },
mounted(){
  
  this.getList()
},
methods: {
  getList() {
      getList(this.params).then(response => {
        console.log('getusersList ======>', response)
        // this.bookesList = response.data.results
        this.tableData = response.data.results
        this.total = response.data.count
      })
    },

  }
}
</script>
